/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-07 13:44:18  
 * Copyright (c) 2015- joysuch-版权所有     
 */
package com.joysuch.wwyt.bp.service;

import com.joysuch.wwyt.bp.bean.*;
import com.joysuch.wwyt.bp.entity.BpEmergencyContingencyPlan;

import static com.joysuch.wwyt.bp.bean.BpEmergencyContingencyPlanListBean.Search;

import com.joysuch.wwyt.bp.entity.BpEmergencyContingencyType;
import com.joysuch.wwyt.bp.entity.BpEmergencyContingencyPlans;
import com.joysuch.wwyt.bp.entity.BpEmergencyPeople;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.monitoringcenter.bean.CenterEmergencyPlanBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BpEmergencyContingencyPlanService {

    public BpEmergencyContingencyPlan add(BpEmergencyContingencyPlanEditBean entity) throws Exception;

    void update(BpEmergencyContingencyPlanEditBean entity) throws Exception;

    Page<BpEmergencyContingencyPlanListBean> findByPage(Pageable page, Search condition);
    
    void delete(Long id) throws BusinessRestrictionsException;

    BpEmergencyContingencyPlanDetailBean getById(Long id);
    
    BpEmergencyContingencyPlans findById(Long id);

    /**
     * 更改预案状态
     * @param id    指定预案 ID
     * @param isPass    是否通过审核（true:通过；false:减少）
     * @param auditRemark   审核意见
     *  【备注：isPass 和 auditRemark 属性，仅在预案状态为等待审核时生效】
     */
    void changeState(Long id, Boolean isPass, String auditRemark);

    BpEmergencyContingencyType addType(BpEmergencyContingencyTypeBean bean);

    BpEmergencyContingencyType updateType(BpEmergencyContingencyTypeBean bean);

    void deleteType(Long id);

    Page<BpEmergencyContingencyTypeBean> pageType(Pageable page, BpEmergencyContingencyTypeBean.SearchType condition);

    List<BpEmergencyContingencyType> findTypeList();

    BpEmergencyContingencyPlans addPlan(BpEmergencyContingencyPlansBean bean);

    BpEmergencyContingencyPlans updatePlan(BpEmergencyContingencyPlansBean bean);

    void deletePlan(Long id);

    BpEmergencyContingencyPlansBean getPlan(Long id);

    void rePlan(Long id);

    Page<BpEmergencyContingencyPlansBean> pagePlan(Pageable page, BpEmergencyContingencyPlansBean.SearchPlanBean condition);

    BpEmergencyPeople addPeople(BpEmergencyPeopleBean bean);

    void deletePeople(Long id);

    BpEmergencyPeopleBean getPeopleById(Long id);

    Page<BpEmergencyPeopleBean> pagePeople(Pageable page, BpEmergencyPeopleBean.SearchPlanBean condition);

    BpEmergencyPeople updatePeople(BpEmergencyPeopleBean bean);

    List<CenterEmergencyPlanBean> getPlanListByHazardId(Long hazardId);
}
